﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DbGenerator.Model.units.table;
using DbGenerator.Model.units.column;

namespace DbGenerator.Model.units.column.relations
{
    public class TFKConnector
    {
        #region ctors
        public TFKConnector(TColumn baseColumn)
        {
            _IsConnected = false;
            _BaseColumn = baseColumn;
        }
        #endregion

        #region methods
        public void ConnectTo(TTable referencedTable)
        {
            _IsConnected = true;
            _ReferencedTable = referencedTable;
        }
        #endregion

        #region properties
        private bool _IsConnected;
        public bool IsConnected
        {
            get { return _IsConnected; }
        }
        private TColumn _BaseColumn;
        public TColumn BaseColumn
        {
            get { return _BaseColumn; }
        }

        private TTable _ReferencedTable;
        public TTable ReferencedTable
        {
            get { return _ReferencedTable; }
        }
        #endregion
    }
}
